package study02;
import java.util.Scanner;

/**
* @author GZQ
* @Date 2023/11/5
 */

//输入日期，判断格式
public class DateJudge {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入年份：");
        int y = input.nextInt();
        System.out.println("请输入月份：");
        int m = input.nextInt();
        System.out.println("请输入日期：");
        int d = input.nextInt();
        if (y >= 1900 && y <= 2014 && m >= 1 && m <= 12 && d >= 1 && d <= 31){
            System.out.println("该日期格式正确");
        }else {
            System.out.println("该日期格式不正确");
        }
    }
}
